import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';

import '../../config/config.dart';

class LanguageLogic extends GetxController {
  var currentLanguage = 'zh_TW'.obs;

  var fromRouter = '';

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    final box = GetStorage();
    currentLanguage.value = box.read(Config.languageKey) ?? 'zh_CN';
    fromRouter=Get.previousRoute;
  }

  @override
  void onReady() async {
    // TODO: implement onReady
    super.onReady();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    super.onClose();
  }
}
